﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DIS_App_Client.Reports
{
    public partial class FrmPrintOrder : Form
    {
        public string IDOrder { get; set; }
        public string OrderDate { get; set; }
        public string Sum { get; set; }
        public DataTable DataSource { get; set; }

        public FrmPrintOrder()
        {
            InitializeComponent();
        }

        private void FrmPrintOrder_Load(object sender, EventArgs e)
        {
            rptOrder rpt = new rptOrder();
            rpt.DataDefinition.FormulaFields["IDOrder"].Text = "'" + this.IDOrder + "'";
            rpt.DataDefinition.FormulaFields["OrderDate"].Text = "'" + this.OrderDate + "'";
            rpt.DataDefinition.FormulaFields["Sum"].Text = "'" + this.Sum + "'";

            rpt.SetDataSource(DataSource);
            crystalReportViewer1.ReportSource = rpt;
        }
    }
}
